package com.byzk.p2p.admin.city.dto;

import java.util.List;

/**
 * 城市表
 * @author suker.zhou
 *
 */
public class City {
	
    private Integer id;//主键

    private String name;//名称

    private Integer pid;

    private Integer root;

    private String code;
    
    private List<City> city;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	public Integer getRoot() {
		return root;
	}

	public void setRoot(Integer root) {
		this.root = root;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public List<City> getCity() {
		return city;
	}

	public void setCity(List<City> city) {
		this.city = city;
	}

	public City convertCity(City city){
		City cityItem = new City();
		cityItem.setCode(city.getCode());
		cityItem.setId(city.getId());
		cityItem.setName(city.getName());
		cityItem.setPid(city.getPid());
		cityItem.setRoot(city.getRoot());
		return cityItem;
	}
}